implement templated agentHelmValues - #783
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Greptile SummaryThis PR adds Liquid template rendering for
Confidence Score: 4/5The new templating path is opt-in and gated by AgentHelmValuesTemplateable, leaving the existing non-templated flow unchanged. Both findings are non-blocking quality concerns: the map-mutation-during-range in clusterBindings is harmless in practice but is an anti-pattern, and the string-based fallback detection could break silently if the error message format changes. pkg/console/settings.go (fallback error detection) and pkg/console/agent_helm_values.go (clusterBindings map iteration)
|
| Filename | Overview |
|---|---|
| pkg/console/agent_helm_values.go | New file implementing Liquid template rendering for agentHelmValues. Logic is correct; minor style issue with map mutation during range iteration in clusterBindings. |
| pkg/console/agent_helm_values_test.go | Solid test coverage for ResolveAgentHelmValues and IsUnknownGraphQLField, covering nil settings, non-templated, templated, and metadata/tags cases. |
| pkg/console/settings.go | Adds backwards-compatible fallback to a minimal GraphQL query when agentHelmValuesTemplateable is unsupported; fallback detection relies on string-matching the error message. |
| pkg/client/plural.go | DoInstallOperator updated to fetch cluster context when templating is enabled and delegate YAML resolution to ResolveAgentHelmValues; logic and error handling are correct. |
| pkg/console/console.go | Adds GetGlobalSettingsMinimal to the ConsoleClient interface to support the backwards-compatible fallback path. |
| go.mod | Bumps console client from a pseudo-version to v1.76.5 and removes the replace directive that was pinning it to a pre-release commit. |
Reviews (1): Last reviewed commit: "implement templated agentHelmValues" | Re-trigger Greptile
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Summary
Labels
Test Plan
Checklist